package edu.avans.hartigehap.domain;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.Entity;

@Entity
public class WebMinusDiscount extends WebDiscountInterface implements Serializable{

	private static final long serialVersionUID = 1L;

	private BigDecimal discount;

	public WebMinusDiscount(){

	}

	public WebMinusDiscount(BigDecimal discount){
		this.discount = discount;
	}

	public BigDecimal getDiscount() {
		return discount;
	}

	public void setDiscount(BigDecimal discount) {
		this.discount = discount;
	}

	public BigDecimal getFinalPrice(BigDecimal price) {
		return price.subtract(discount);
	}

}
